package com.ruoyi.web.controller.system.Fdongbei;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.Fdongbei.domain.TbGuozhong;
import com.ruoyi.system.Fdongbei.domain.TbYcXccl;
import com.ruoyi.system.Fdongbei.service.ITbYcXcclService;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static com.ruoyi.common.core.domain.AjaxResult.success;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author fufeng
 * @since 2025-02-04
 */
@RestController
@RequestMapping("/system/Fdongbei/tb-yc-xccl")
public class TbYcXcclController extends BaseController {

    @Resource
    ITbYcXcclService iTbYcXcclService;

    @GetMapping("/list")
    public TableDataInfo selectyccl(String sql) {
        startPage();
        List<TbYcXccl> list = iTbYcXcclService.selectxccl(sql);
        return getDataTable(list);
    }

    @PostMapping("/insert")
    public AjaxResult insertxccl(TbYcXccl tbYcXccl) {
        return success(iTbYcXcclService.insertxccl(tbYcXccl));

    }

    @GetMapping("/selectbyczbh")
    public AjaxResult selectbyczbh(String czbh) {
        return success(iTbYcXcclService.selectbyczbh(czbh));
    }

    @PostMapping("/updatexccl")
    public AjaxResult updatexccl(TbYcXccl tbYcXccl) {
        return success(iTbYcXcclService.updatexccl(tbYcXccl));
    }

    @PostMapping("/deletexccl")
    public AjaxResult deletexccl(String czbh) {
        return success(iTbYcXcclService.deletexccl(czbh));
    }

}

